home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / program / n_b_v203.zip / CHR2MID$.DMO < prev    next >
Text File  |  1996-07-04  |  2KB  |  49 lines

  1. $if 0
  2.     ┌──────────────────────────╖                        PowerBASIC v3.20
  3.  ┌──┤          DASoft          ╟──────────────────────┬──────────────────╖
  4.  │  ├──────────────────────────╢    Copyright 1995    │ DATE: 1995-10-01 ╟─╖
  5.  │  │ FILE NAME   CHR2MID$.DMO ║          by          ╘════════════════─ ║ ║
  6.  │  │                          ║  Don Schullian, Jr.                     ║ ║
  7.  │  ╘══════════════════════════╝                                         ║ ║
  8.  │ A license is hereby granted to the holder to use this source code in  ║ ║
  9.  │ any program, commercial or otherwise,  without receiving the express  ║ ║
  10.  │ permission of the copyright holder and without paying any royalties,  ║ ║
  11.  │ as long as this code is not distributed in any compilable format.     ║ ║
  12.  │  IE: source code files, PowerBASIC Unit files, and printed listings   ║ ║
  13.  ╘═╤═════════════════════════════════════════════════════════════════════╝ ║
  14.    │                ....................................                   ║
  15.    ╘═══════════════════════════════════════════════════════════════════════╝
  16. $endif
  17.  
  18. $INCLUDE "DAS-NB01.INC"
  19. COLOR 7,0
  20. CLS
  21.  
  22. ? "┌───────────────────────────────────────────────────────────
  23. ? "│ CHR2MID ( V$, MidPos%, Char? )
  24. ? "├──────────────────────────────────────────────────────────────
  25. ? "│ This is yet another of those very specialized little things
  26. ? "│ that do a big job quickly and efficiently.
  27. ? "│ Instead of MID$( V$, 10, 1 ) = CHR$( 32 )
  28. ? "│ you use    CHR2MID V$, 10, 32
  29. ? "│                                and save both time and typing!
  30. ? "└─────────────────────────────────────────────────────────────────────
  31.  
  32. V$ = "This is a test>"
  33. PRINT V$
  34. PRINT
  35.  
  36. MTIMER
  37.   CHR2MID V$, 15, 46
  38. DASoft = MTIMER
  39. PRINT V$
  40. PRINT USING "ELAPSED TIME: DASoft =###m/sec"; DASoft
  41. PRINT
  42.  
  43. MTIMER
  44.   MID$( V$, 15, 1 ) = CHR$( 62 )
  45. PBasic = MTIMER
  46. PRINT V$
  47. PRINT USING "ELAPSED TIME: PBasic =###m/sec"; PBasic
  48.  
  49.